home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / applications / wp / mced-1.0.lha / CEDScripts / Preview.ced < prev    next >
Encoding:
Text File  |  1992-09-02  |  1.9 KB  |  59 lines

  1. /*
  2. **    Preview.ced
  3. **    
  4. **    $VER: Preview.ced 1.0 (14.1.95)
  5. **    
  6. **    This scripts shows current file using MultiView. This way a user can
  7. **    see text's attributes (italic, bold), colors etc. The file is shown on
  8. **    CEd's screen using backdrop window and CEd's font.
  9. **    See docs for more details.
  10. **    
  11. **    This script reuires CygnusEd Professional v3.5 (or later) and Workbench
  12. **    3.0 (or later) to run.
  13. **    
  14. **    Copyright © 1995 Michael Letowski
  15. */
  16.  
  17. /* Get host */
  18. PARSE SOURCE com res called resolved ext host .
  19. IF host="REXX" THEN                                                /* From command line */
  20.     ADDRESS "rexx_ced"                                            /* Talk to default ced */
  21.  
  22. OPTIONS RESULTS                                                        /* Enable results from commands */
  23.  
  24. 'Status CURSORCOLUMN'                                            /* Get cursor horizontal... */
  25. Column=RESULT+1
  26. 'Status CURSORLINE'                                                /* ... and vertical position */
  27. Line=RESULT+1
  28.  
  29. Comm="SYS:Utilities/MultiView CLIPBOARD"    /* Set up command string */
  30.  
  31. 'Status CLIPUNIT'                                                    /* Get clipboard unit */
  32. Comm=Comm "CLIPUNIT" RESULT                                /* Add to command string */
  33.  
  34. 'Status PUBSCREENNAME'                                        /* Get name of CEd's public screen */
  35. Screen=RESULT
  36. IF Screen~="" & Screen~="RESULT" THEN            /* CygnusEd's screen is public */
  37.     Comm=Comm "BACKDROP PUBSCREEN" Screen        /* Add to command string */
  38.  
  39. 'Status FONTINFO'                                                    /* Get font data */
  40. PARSE VAR RESULT Name ".font" Size .            /* Parse it */
  41. Comm=Comm "FONTNAME" Name "FONTSIZE" Size    /* Add to command string */
  42.  
  43. 'DM "Copying to clipboard..."'                        /* Let the user know what's going on */
  44.  
  45. 'Beg of file'                                                            /* Copy whole file to clipboard */
  46. 'Mark block'
  47. 'End of file'
  48. 'Copy block'
  49.  
  50. 'LL' Line Column                                                    /* Move cursor to old position */
  51. 'DM "Previewing file..."'                                    /* Change status bar again */
  52.  
  53. ADDRESS COMMAND Comm                                            /* Use MultiView to display contents of Clipboard */
  54.  
  55. 'CEdToFront'                                                            /* Jump back to CEd's screen */
  56. 'DM'                                                                            /* Restore status line */
  57.  
  58. EXIT
  59.